import React from 'react';
import {
    StyleSheet,
    FlatList,
    View,
    Text,
    ActivityIndicator,
    Image,
    Platform,
    Dimensions
} from 'react-native';

import CommunityTopCell from '../cell/CommunityTopCell'
import CommunityHeaderCell from "../cell/CommunityHeaderCell"
import CommunityContentCell from "../cell/CommunityContentCell"
import CommunityTitleCell from "../cell/CommunityTitleCell"
import CommunityMediaGatherCell from "../cell/CommunityMediaGatherCell"
import CommunityMediaCell from "../cell/CommunityMediaCell"
import CommunityToolCell from "../cell/CommunityToolCell"
import CommunityTagCell from '../cell/CommunityTagCell'

import { all_commentAction } from '../../utils'
import { all_shareAction } from '../../utils'
import { all_moreAction } from '../../utils'
import { all_clickCellAction } from '../../utils'
import { all_clickImgAction } from '../../utils'
import { all_clickTopAction } from '../../utils'
import { getContentHeight } from '../../utils'

const tops = [{
    'title': '公告',
    'content': '《神武4》2020年2月21日维护公告'
},
{
    'title': '交流',
    'content': '《神武4》新服“春暖花开”2月21日...'
},
{
    'title': '公告',
    'content': '神武近期更新相关问题解决办法'
},
{
    'title': '交流',
    'content': '《【导航】神武4》电脑版社区爆料...'
},
{
    'title': '公告',
    'content': '多益游戏社区运营招聘，期待你的...'
},
]

const dataSource = [{
    "id": "1",
    "title": "心不散，终夺冠！第89届神武之战...",
    "content": "在上周日进行的第89届神武之战[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手比赛中，战无不胜A队披荆斩棘，终获冠军！今天小吉祥为大家带了战无不胜A队的冠军采访，一起...",
    "needRichText": 1,
    "img": [{ "url": "http://5b0988e595225.cdn.sohucs.com/images/20190222/7cc43f2edb54439eb6aaee9dd804b663.jpeg", "width": 1024, "height": 768 }],
    "gameName": "神武4手游",
    "time": "16小时前",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582011742167&di=a1fbe78b2b60f0afe89cb66b7175164b&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D3460423160%2C2339690649%26fm%3D214%26gp%3D0.jpg",
    "comment": "1509",
    "thumbup": "245",
    "tag": [{ "content": "推荐", 'color': 'rgba(169,46,186,1)' }, { "content": "精华", 'color': 'green' },]
},
{
    "id": "2",
    "title": "门派小说《大道无名》今日上线 邀...",
    "content": "封印混沌，以护苍生，《神武4》电脑版首[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手篇门派小说《大道无名》今日正式上线，同名广播剧同步开启播放，深度揭秘轩辕黄帝三十...",
    "needRichText": 1,
    "img": [{ "url": "https://img2.ali213.net/picfile/News/2020/02/21/584_2020022154135195.jpg", "width": 584, "height": 324 }],
    "gameName": "神武4手游",
    "time": "16小时前",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582011742167&di=a1fbe78b2b60f0afe89cb66b7175164b&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D3460423160%2C2339690649%26fm%3D214%26gp%3D0.jpg",
    "comment": "9",
    "thumbup": "17",
    "tag": [{ "content": "推荐", 'color': 'rgba(169,46,186,1)' }, { "content": "活动", 'color': 'rgba(100,152,250,1)' },]
},
{
    "id": "3",
    "title": "2020",
    "content": "有好友[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手嘛",
    "needRichText": 0,
    "img": [],
    "gameName": "西哈哈哈哈哈",
    "time": "20小时前",
    "gameIcon": "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=872869510,4092430252&fm=26&gp=0.jpg",
    "comment": "9",
    "thumbup": "11"
},
{
    "id": "4",
    "title": "还有一些宝宝懒得弄了，丢家里",
    "content": "[墨镜]",
    "needRichText": 0,
    "img": [{ "url": "https://image.duoyi.com/com/322/pic/dfb15f21f4a846f5b371458700fdd347.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/ed39518f40bb40dc91ffef23f19275ec.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/57cd9fdf390e4603bdcf60e010540790.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/9127399c730e49a2982dc5a2c280aac8.jpg", "width": 567, "height": 384 }],
    "gameName": "男子汉灬",
    "time": "02-24",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582608020100&di=df0f7083a2e3ec2b592e7bcb96b64da8&imgtype=jpg&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20191230%2F39309aacf6bd48c7b4a78b3d9644cef3.gif",
    "comment": "1",
    "thumbup": "3"
},
{
    "id": "5",
    "title": "有没有成都的小哥哥小姐姐[天使]",
    "content": "小白菜，啥都不会，有没有同[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手区的朋友加好友，加战友",
    "needRichText": 0,
    "img": [{ "url": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582609234240&di=f42500f78cd3323bfd814d8a4e692755&imgtype=0&src=http%3A%2F%2Fpic2.52pk.com%2Ffiles%2F120606%2F1284620_165254_1_lit.jpg", "width": 317, "height": 400 }],
    "gameName": "小九橙",
    "time": "02-23",
    "gameIcon": "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1636258242,3300857118&fm=26&gp=0.jpg",
    "comment": "4",
    "thumbup": "6"
},
{
    "id": "6",
    "title": "没有赶上线下北京站很遗憾",
    "content": "有没有小姐姐求[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手安慰",
    "needRichText": 0,
    "img": [{ "url": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582609517637&di=10d3334f7ea5d719aa3196cd46ffab87&imgtype=0&src=http%3A%2F%2Fd.hiphotos.baidu.com%2Fbaike%2Fpic%2Fitem%2F023b5bb5c9ea15ce45c20bbcb1003af33a87b253.jpg", "width": 1920, "height": 1280 }],
    "gameName": "shenmadoushi",
    "time": "02-22",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582608736103&di=3e95e4f8fd8fb4bd2f4cf2fcd1de3d45&imgtype=0&src=http%3A%2F%2Fi3.17173cdn.com%2F2fhnvk%2FYWxqaGBf%2Fcms3%2FsbzdDFbllFeEgnf.jpg",
    "comment": "16",
    "thumbup": "20"
},
{
    "id": "1",
    "title": "心不散，终夺冠！第89届神武之战...",
    "content": "在上周日进行的第8[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手9届神武之战比赛中，战无不胜A队披荆斩棘，终获冠军！今天小吉祥为大家带了战无不胜A队的冠军采访，一起...",
    "needRichText": 1,
    "img": [{ "url": "http://5b0988e595225.cdn.sohucs.com/images/20190222/7cc43f2edb54439eb6aaee9dd804b663.jpeg", "width": 1024, "height": 768 }],
    "gameName": "神武4手游",
    "time": "16小时前",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582011742167&di=a1fbe78b2b60f0afe89cb66b7175164b&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D3460423160%2C2339690649%26fm%3D214%26gp%3D0.jpg",
    "comment": "1509",
    "thumbup": "245",
    "tag": [{ "content": "推荐", 'color': 'rgba(169,46,186,1)' }, { "content": "精华", 'color': 'green' },]
},
{
    "id": "2",
    "title": "门派小说《大道无名》今日上线 邀...",
    "content": "封印混沌，以护苍[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手生，《神武4》电脑版首篇门派小说《大道无名》今日正式上线，同名广播剧同步开启播放，深度揭秘轩辕黄帝三十...",
    "needRichText": 1,
    "img": [{ "url": "https://img2.ali213.net/picfile/News/2020/02/21/584_2020022154135195.jpg", "width": 584, "height": 324 }],
    "gameName": "神武4手游",
    "time": "16小时前",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582011742167&di=a1fbe78b2b60f0afe89cb66b7175164b&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D3460423160%2C2339690649%26fm%3D214%26gp%3D0.jpg",
    "comment": "9",
    "thumbup": "17",
    "tag": [{ "content": "推荐", 'color': 'rgba(169,46,186,1)' }, { "content": "活动", 'color': 'rgba(100,152,250,1)' },]
},
{
    "id": "3",
    "title": "2020",
    "content": "有好友嘛",
    "needRichText": 0,
    "img": [],
    "gameName": "西哈哈哈哈哈",
    "time": "20小时前",
    "gameIcon": "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=872869510,4092430252&fm=26&gp=0.jpg",
    "comment": "9",
    "thumbup": "11"
},
{
    "id": "4",
    "title": "还有一些宝宝懒得弄了，丢家里",
    "content": "[[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手墨镜]",
    "needRichText": 0,
    "img": [{ "url": "https://image.duoyi.com/com/322/pic/dfb15f21f4a846f5b371458700fdd347.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/ed39518f40bb40dc91ffef23f19275ec.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/57cd9fdf390e4603bdcf60e010540790.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/9127399c730e49a2982dc5a2c280aac8.jpg", "width": 567, "height": 384 }],
    "gameName": "男子汉灬",
    "time": "02-24",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582608020100&di=df0f7083a2e3ec2b592e7bcb96b64da8&imgtype=jpg&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20191230%2F39309aacf6bd48c7b4a78b3d9644cef3.gif",
    "comment": "1",
    "thumbup": "3"
},
{
    "id": "5",
    "title": "有没有成都的小哥哥小姐姐[天使]",
    "content": "小白菜，啥都不会，有没有同区的朋友加好友，[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手加战友",
    "needRichText": 0,
    "img": [{ "url": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582609234240&di=f42500f78cd3323bfd814d8a4e692755&imgtype=0&src=http%3A%2F%2Fpic2.52pk.com%2Ffiles%2F120606%2F1284620_165254_1_lit.jpg", "width": 317, "height": 400 }],
    "gameName": "小九橙",
    "time": "02-23",
    "gameIcon": "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1636258242,3300857118&fm=26&gp=0.jpg",
    "comment": "4",
    "thumbup": "6"
},
{
    "id": "6",
    "title": "没有赶上线下北京站很遗憾",
    "content": "有没有小姐姐[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手求安慰",
    "needRichText": 0,
    "img": [{ "url": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582609517637&di=10d3334f7ea5d719aa3196cd46ffab87&imgtype=0&src=http%3A%2F%2Fd.hiphotos.baidu.com%2Fbaike%2Fpic%2Fitem%2F023b5bb5c9ea15ce45c20bbcb1003af33a87b253.jpg", "width": 1920, "height": 1280 }],
    "gameName": "shenmadoushi",
    "time": "02-22",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582608736103&di=3e95e4f8fd8fb4bd2f4cf2fcd1de3d45&imgtype=0&src=http%3A%2F%2Fi3.17173cdn.com%2F2fhnvk%2FYWxqaGBf%2Fcms3%2FsbzdDFbllFeEgnf.jpg",
    "comment": "16",
    "thumbup": "20"
},
{
    "id": "1",
    "title": "心不散，终夺冠！第89届神武之战...",
    "content": "在上周日进行的第89届神武之战比赛中，战无不胜[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手A队披荆斩棘，终获冠军！今天小吉祥为大家带了战无不胜A队的冠军采访，一起...",
    "needRichText": 1,
    "img": [{ "url": "http://5b0988e595225.cdn.sohucs.com/images/20190222/7cc43f2edb54439eb6aaee9dd804b663.jpeg", "width": 1024, "height": 768 }],
    "gameName": "神武4手游",
    "time": "16小时前",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582011742167&di=a1fbe78b2b60f0afe89cb66b7175164b&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D3460423160%2C2339690649%26fm%3D214%26gp%3D0.jpg",
    "comment": "1509",
    "thumbup": "245",
    "tag": [{ "content": "推荐", 'color': 'rgba(169,46,186,1)' }, { "content": "精华", 'color': 'green' },]
},
{
    "id": "2",
    "title": "门派小说《大道无名》今日上线 邀...",
    "content": "封印混沌，以护苍生，《神武4》电脑版首篇门派小说《大[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手道无名》今日正式上线，同名广播剧同步开启播放，深度揭秘轩辕黄帝三十...",
    "needRichText": 1,
    "img": [{ "url": "https://img2.ali213.net/picfile/News/2020/02/21/584_2020022154135195.jpg", "width": 584, "height": 324 }],
    "gameName": "神武4手游",
    "time": "16小时前",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582011742167&di=a1fbe78b2b60f0afe89cb66b7175164b&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D3460423160%2C2339690649%26fm%3D214%26gp%3D0.jpg",
    "comment": "9",
    "thumbup": "17",
    "tag": [{ "content": "推荐", 'color': 'rgba(169,46,186,1)' }, { "content": "活动", 'color': 'rgba(100,152,250,1)' },]
},
{
    "id": "3",
    "title": "2020",
    "content": "有好友嘛[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手",
    "needRichText": 0,
    "img": [],
    "gameName": "西哈哈哈哈哈",
    "time": "20小时前",
    "gameIcon": "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=872869510,4092430252&fm=26&gp=0.jpg",
    "comment": "9",
    "thumbup": "11"
},
{
    "id": "4",
    "title": "还有一些宝宝懒得弄了，丢家里",
    "content": "[墨镜][舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手]",
    "needRichText": 0,
    "img": [{ "url": "https://image.duoyi.com/com/322/pic/dfb15f21f4a846f5b371458700fdd347.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/ed39518f40bb40dc91ffef23f19275ec.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/57cd9fdf390e4603bdcf60e010540790.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/9127399c730e49a2982dc5a2c280aac8.jpg", "width": 567, "height": 384 }],
    "gameName": "男子汉灬",
    "time": "02-24",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582608020100&di=df0f7083a2e3ec2b592e7bcb96b64da8&imgtype=jpg&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20191230%2F39309aacf6bd48c7b4a78b3d9644cef3.gif",
    "comment": "1",
    "thumbup": "3"
},
{
    "id": "5",
    "title": "有没有成都的小哥哥小姐姐[天使]",
    "content": "小白菜，啥都不会，有没有同区[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手]的朋友加好友，加战友",
    "needRichText": 0,
    "img": [{ "url": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582609234240&di=f42500f78cd3323bfd814d8a4e692755&imgtype=0&src=http%3A%2F%2Fpic2.52pk.com%2Ffiles%2F120606%2F1284620_165254_1_lit.jpg", "width": 317, "height": 400 }],
    "gameName": "小九橙",
    "time": "02-23",
    "gameIcon": "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1636258242,3300857118&fm=26&gp=0.jpg",
    "comment": "4",
    "thumbup": "6"
},
{
    "id": "6",
    "title": "没有赶上线下北京站很遗憾",
    "content": "有没有小姐姐求安慰",
    "needRichText": 0,
    "img": [{ "url": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582609517637&di=10d3334f7ea5d719aa3196cd46ffab87&imgtype=0&src=http%3A%2F%2Fd.hiphotos.baidu.com%2Fbaike%2Fpic%2Fitem%2F023b5bb5c9ea15ce45c20bbcb1003af33a87b253.jpg", "width": 1920, "height": 1280 }],
    "gameName": "shenmadoushi",
    "time": "02-22",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582608736103&di=3e95e4f8fd8fb4bd2f4cf2fcd1de3d45&imgtype=0&src=http%3A%2F%2Fi3.17173cdn.com%2F2fhnvk%2FYWxqaGBf%2Fcms3%2FsbzdDFbllFeEgnf.jpg",
    "comment": "16",
    "thumbup": "20"
},
{
    "id": "1",
    "title": "心不散，终夺冠！第89届神武之战...",
    "content": "在上周日进行的第89届神武之战比赛中，战无不胜A队[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手]披荆斩棘，终获冠军！今天小吉祥为大家带了战无不胜A队的冠军采访，一起...",
    "needRichText": 1,
    "img": [{ "url": "http://5b0988e595225.cdn.sohucs.com/images/20190222/7cc43f2edb54439eb6aaee9dd804b663.jpeg", "width": 1024, "height": 768 }],
    "gameName": "神武4手游",
    "time": "16小时前",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582011742167&di=a1fbe78b2b60f0afe89cb66b7175164b&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D3460423160%2C2339690649%26fm%3D214%26gp%3D0.jpg",
    "comment": "1509",
    "thumbup": "245",
    "tag": [{ "content": "推荐", 'color': 'rgba(169,46,186,1)' }, { "content": "精华", 'color': 'green' },]
},
{
    "id": "2",
    "title": "门派小说《大道无名》今日上线 邀...",
    "content": "封印混沌，以护苍生，《神武4》电脑版首篇门[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手]派小说《大道无名》今日正式上线，同名广播剧同步开启播放，深度揭秘轩辕黄帝三十...",
    "needRichText": 1,
    "img": [{ "url": "https://img2.ali213.net/picfile/News/2020/02/21/584_2020022154135195.jpg", "width": 584, "height": 324 }],
    "gameName": "神武4手游",
    "time": "16小时前",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582011742167&di=a1fbe78b2b60f0afe89cb66b7175164b&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D3460423160%2C2339690649%26fm%3D214%26gp%3D0.jpg",
    "comment": "9",
    "thumbup": "17",
    "tag": [{ "content": "推荐", 'color': 'rgba(169,46,186,1)' }, { "content": "活动", 'color': 'rgba(100,152,250,1)' },]
},
{
    "id": "3",
    "title": "2020",
    "content": "有好友[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手]嘛",
    "needRichText": 0,
    "img": [],
    "gameName": "西哈哈哈哈哈",
    "time": "20小时前",
    "gameIcon": "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=872869510,4092430252&fm=26&gp=0.jpg",
    "comment": "9",
    "thumbup": "11"
},
{
    "id": "4",
    "title": "还有一些宝宝懒得弄了，丢家里",
    "content": "[墨镜][舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手]",
    "needRichText": 0,
    "img": [{ "url": "https://image.duoyi.com/com/322/pic/dfb15f21f4a846f5b371458700fdd347.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/ed39518f40bb40dc91ffef23f19275ec.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/57cd9fdf390e4603bdcf60e010540790.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/9127399c730e49a2982dc5a2c280aac8.jpg", "width": 567, "height": 384 }],
    "gameName": "男子汉灬",
    "time": "02-24",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582608020100&di=df0f7083a2e3ec2b592e7bcb96b64da8&imgtype=jpg&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20191230%2F39309aacf6bd48c7b4a78b3d9644cef3.gif",
    "comment": "1",
    "thumbup": "3"
},
{
    "id": "5",
    "title": "有没有成都的小哥哥小姐姐[天使]",
    "content": "小白菜，啥都不会，有没有同区的朋[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手]友加好友，加战友",
    "needRichText": 0,
    "img": [{ "url": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582609234240&di=f42500f78cd3323bfd814d8a4e692755&imgtype=0&src=http%3A%2F%2Fpic2.52pk.com%2Ffiles%2F120606%2F1284620_165254_1_lit.jpg", "width": 317, "height": 400 }],
    "gameName": "小九橙",
    "time": "02-23",
    "gameIcon": "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1636258242,3300857118&fm=26&gp=0.jpg",
    "comment": "4",
    "thumbup": "6"
},
{
    "id": "6",
    "title": "没有赶上线下北京站很遗憾",
    "content": "有没有小姐姐[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手]求安慰",
    "needRichText": 0,
    "img": [{ "url": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582609517637&di=10d3334f7ea5d719aa3196cd46ffab87&imgtype=0&src=http%3A%2F%2Fd.hiphotos.baidu.com%2Fbaike%2Fpic%2Fitem%2F023b5bb5c9ea15ce45c20bbcb1003af33a87b253.jpg", "width": 1920, "height": 1280 }],
    "gameName": "shenmadoushi",
    "time": "02-22",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582608736103&di=3e95e4f8fd8fb4bd2f4cf2fcd1de3d45&imgtype=0&src=http%3A%2F%2Fi3.17173cdn.com%2F2fhnvk%2FYWxqaGBf%2Fcms3%2FsbzdDFbllFeEgnf.jpg",
    "comment": "16",
    "thumbup": "20"
},
{
    "id": "1",
    "title": "心不散，终夺冠！第89届神武之战...",
    "content": "在上周日进行的第89届[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手]神武之战比赛中，战无不胜A队披荆斩棘，终获冠军！今天小吉祥为大家带了战无不胜A队的冠军采访，一起...",
    "needRichText": 1,
    "img": [{ "url": "http://5b0988e595225.cdn.sohucs.com/images/20190222/7cc43f2edb54439eb6aaee9dd804b663.jpeg", "width": 1024, "height": 768 }],
    "gameName": "神武4手游",
    "time": "16小时前",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582011742167&di=a1fbe78b2b60f0afe89cb66b7175164b&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D3460423160%2C2339690649%26fm%3D214%26gp%3D0.jpg",
    "comment": "1509",
    "thumbup": "245",
    "tag": [{ "content": "推荐", 'color': 'rgba(169,46,186,1)' }, { "content": "精华", 'color': 'green' },]
},
{
    "id": "2",
    "title": "门派小说《大道无名》今日上线 邀...",
    "content": "封印混沌，以护苍生[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手]，《神武4》电脑版首篇门派小说《大道无名》今日正式上线，同名广播剧同步开启播放，深度揭秘轩辕黄帝三十...",
    "needRichText": 1,
    "img": [{ "url": "https://img2.ali213.net/picfile/News/2020/02/21/584_2020022154135195.jpg", "width": 584, "height": 324 }],
    "gameName": "神武4手游",
    "time": "16小时前",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582011742167&di=a1fbe78b2b60f0afe89cb66b7175164b&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D3460423160%2C2339690649%26fm%3D214%26gp%3D0.jpg",
    "comment": "9",
    "thumbup": "17",
    "tag": [{ "content": "推荐", 'color': 'rgba(169,46,186,1)' }, { "content": "活动", 'color': 'rgba(100,152,250,1)' },]
},
{
    "id": "3",
    "title": "2020",
    "content": "有好友嘛[舞蹈][舞蹈][拍手][舞蹈][舞蹈][拍手]",
    "needRichText": 0,
    "img": [],
    "gameName": "西哈哈哈哈哈",
    "time": "20小时前",
    "gameIcon": "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=872869510,4092430252&fm=26&gp=0.jpg",
    "comment": "9",
    "thumbup": "11"
},
{
    "id": "4",
    "title": "还有一些宝宝懒得弄了，丢家里",
    "content": "[墨镜]",
    "needRichText": 0,
    "img": [{ "url": "https://image.duoyi.com/com/322/pic/dfb15f21f4a846f5b371458700fdd347.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/ed39518f40bb40dc91ffef23f19275ec.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/57cd9fdf390e4603bdcf60e010540790.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/9127399c730e49a2982dc5a2c280aac8.jpg", "width": 567, "height": 384 }],
    "gameName": "男子汉灬",
    "time": "02-24",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582608020100&di=df0f7083a2e3ec2b592e7bcb96b64da8&imgtype=jpg&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20191230%2F39309aacf6bd48c7b4a78b3d9644cef3.gif",
    "comment": "1",
    "thumbup": "3"
},
{
    "id": "5",
    "title": "有没有成都的小哥哥小姐姐[天使]",
    "content": "小白菜，啥都不会，有没有同区的朋友加好友，姐[舞蹈][舞蹈][拍手]加战友",
    "needRichText": 0,
    "img": [{ "url": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582609234240&di=f42500f78cd3323bfd814d8a4e692755&imgtype=0&src=http%3A%2F%2Fpic2.52pk.com%2Ffiles%2F120606%2F1284620_165254_1_lit.jpg", "width": 317, "height": 400 }],
    "gameName": "小九橙",
    "time": "02-23",
    "gameIcon": "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1636258242,3300857118&fm=26&gp=0.jpg",
    "comment": "4",
    "thumbup": "6"
},
{
    "id": "6",
    "title": "没有赶上线下北京站很遗憾",
    "content": "有没有小姐[舞蹈][舞蹈][拍手]姐姐求安慰",
    "needRichText": 0,
    "img": [{ "url": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582609517637&di=10d3334f7ea5d719aa3196cd46ffab87&imgtype=0&src=http%3A%2F%2Fd.hiphotos.baidu.com%2Fbaike%2Fpic%2Fitem%2F023b5bb5c9ea15ce45c20bbcb1003af33a87b253.jpg", "width": 1920, "height": 1280 }],
    "gameName": "shenmadoushi",
    "time": "02-22",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582608736103&di=3e95e4f8fd8fb4bd2f4cf2fcd1de3d45&imgtype=0&src=http%3A%2F%2Fi3.17173cdn.com%2F2fhnvk%2FYWxqaGBf%2Fcms3%2FsbzdDFbllFeEgnf.jpg",
    "comment": "16",
    "thumbup": "20"
},
{
    "id": "1",
    "title": "心不散，终夺冠！第89届神武之战...",
    "content": "在上周日进行的第89届神武之战比赛中，战无不胜A队披荆斩棘，终获冠军！今天小吉祥为大家带了战无不胜A队的冠军采访，一起...",
    "needRichText": 1,
    "img": [{ "url": "http://5b0988e595225.cdn.sohucs.com/images/20190222/7cc43f2edb54439eb6aaee9dd804b663.jpeg", "width": 1024, "height": 768 }],
    "gameName": "神武4手游",
    "time": "16小时前",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582011742167&di=a1fbe78b2b60f0afe89cb66b7175164b&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D3460423160%2C2339690649%26fm%3D214%26gp%3D0.jpg",
    "comment": "1509",
    "thumbup": "245",
    "tag": [{ "content": "推荐", 'color': 'rgba(169,46,186,1)' }, { "content": "精华", 'color': 'green' },]
},
{
    "id": "2",
    "title": "门派小说《大道无名》今日上线 邀...",
    "content": "封印混沌，以护苍生，《神武4》电脑版首篇门派小说《大道无名》今日正姐[舞蹈][舞蹈][拍手]式上线，同名广播剧同步开启播放，深度揭秘轩辕黄帝三十...",
    "needRichText": 1,
    "img": [{ "url": "https://img2.ali213.net/picfile/News/2020/02/21/584_2020022154135195.jpg", "width": 584, "height": 324 }],
    "gameName": "神武4手游",
    "time": "16小时前",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582011742167&di=a1fbe78b2b60f0afe89cb66b7175164b&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D3460423160%2C2339690649%26fm%3D214%26gp%3D0.jpg",
    "comment": "9",
    "thumbup": "17",
    "tag": [{ "content": "推荐", 'color': 'rgba(169,46,186,1)' }, { "content": "活动", 'color': 'rgba(100,152,250,1)' },]
},
{
    "id": "3",
    "title": "2020",
    "content": "有好友姐[舞蹈][舞蹈][拍手]嘛",
    "needRichText": 0,
    "img": [],
    "gameName": "西哈哈哈哈哈",
    "time": "20小时前",
    "gameIcon": "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=872869510,4092430252&fm=26&gp=0.jpg",
    "comment": "9",
    "thumbup": "11"
},
{
    "id": "4",
    "title": "还有一些宝宝懒得弄了，丢家里",
    "content": "[墨姐[舞蹈][舞蹈][拍手]镜]",
    "needRichText": 0,
    "img": [{ "url": "https://image.duoyi.com/com/322/pic/dfb15f21f4a846f5b371458700fdd347.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/ed39518f40bb40dc91ffef23f19275ec.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/57cd9fdf390e4603bdcf60e010540790.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/9127399c730e49a2982dc5a2c280aac8.jpg", "width": 567, "height": 384 }],
    "gameName": "男子汉灬",
    "time": "02-24",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582608020100&di=df0f7083a2e3ec2b592e7bcb96b64da8&imgtype=jpg&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20191230%2F39309aacf6bd48c7b4a78b3d9644cef3.gif",
    "comment": "1",
    "thumbup": "3"
},
{
    "id": "5",
    "title": "有没有成都的小哥哥小姐姐[天使]",
    "content": "小白菜，啥都不会姐[舞蹈][舞蹈][拍手]，有没有同区的朋友加好友，加战友",
    "needRichText": 0,
    "img": [{ "url": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582609234240&di=f42500f78cd3323bfd814d8a4e692755&imgtype=0&src=http%3A%2F%2Fpic2.52pk.com%2Ffiles%2F120606%2F1284620_165254_1_lit.jpg", "width": 317, "height": 400 }],
    "gameName": "小九橙",
    "time": "02-23",
    "gameIcon": "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1636258242,3300857118&fm=26&gp=0.jpg",
    "comment": "4",
    "thumbup": "6"
},
{
    "id": "6",
    "title": "没有赶上线下北京站很遗憾",
    "content": "有没有小姐姐[舞蹈][舞蹈][拍手][舞蹈][拍手][舞蹈]求安慰",
    "needRichText": 0,
    "img": [{ "url": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582609517637&di=10d3334f7ea5d719aa3196cd46ffab87&imgtype=0&src=http%3A%2F%2Fd.hiphotos.baidu.com%2Fbaike%2Fpic%2Fitem%2F023b5bb5c9ea15ce45c20bbcb1003af33a87b253.jpg", "width": 1920, "height": 1280 }],
    "gameName": "shenmadoushi",
    "time": "02-22",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582608736103&di=3e95e4f8fd8fb4bd2f4cf2fcd1de3d45&imgtype=0&src=http%3A%2F%2Fi3.17173cdn.com%2F2fhnvk%2FYWxqaGBf%2Fcms3%2FsbzdDFbllFeEgnf.jpg",
    "comment": "16",
    "thumbup": "20"
},
{
    "id": "1",
    "title": "心不散，终夺冠！第89届神武之战...",
    "content": "在上周日进行的第89届神武之战比赛中，战无不胜A队披荆斩棘，终获冠军！今天小吉祥为大家带了战无不胜A队的冠军采访，一起...",
    "needRichText": 1,
    "img": [{ "url": "http://5b0988e595225.cdn.sohucs.com/images/20190222/7cc43f2edb54439eb6aaee9dd804b663.jpeg", "width": 1024, "height": 768 }],
    "gameName": "神武4手游",
    "time": "16小时前",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582011742167&di=a1fbe78b2b60f0afe89cb66b7175164b&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D3460423160%2C2339690649%26fm%3D214%26gp%3D0.jpg",
    "comment": "1509",
    "thumbup": "245",
    "tag": [{ "content": "推荐", 'color': 'rgba(169,46,186,1)' }, { "content": "精华", 'color': 'green' },]
},
{
    "id": "2",
    "title": "门派小说《大道无名》今日上线 邀...",
    "content": "封印混沌，以护苍生，《神武4》电脑版首篇[舞蹈][舞蹈][拍手][舞蹈][拍手][舞蹈]门派小说《大道无名》今日正式上线，同名广播剧同步开启播放，深度揭秘轩辕黄帝三十...",
    "needRichText": 1,
    "img": [{ "url": "https://img2.ali213.net/picfile/News/2020/02/21/584_2020022154135195.jpg", "width": 584, "height": 324 }],
    "gameName": "神武4手游",
    "time": "16小时前",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582011742167&di=a1fbe78b2b60f0afe89cb66b7175164b&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D3460423160%2C2339690649%26fm%3D214%26gp%3D0.jpg",
    "comment": "9",
    "thumbup": "17",
    "tag": [{ "content": "推荐", 'color': 'rgba(169,46,186,1)' }, { "content": "活动", 'color': 'rgba(100,152,250,1)' },]
},
{
    "id": "3",
    "title": "2020",
    "content": "有好友[舞蹈][舞蹈][拍手][舞蹈][拍手][舞蹈]嘛",
    "needRichText": 0,
    "img": [],
    "gameName": "西哈哈哈哈哈",
    "time": "20小时前",
    "gameIcon": "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=872869510,4092430252&fm=26&gp=0.jpg",
    "comment": "9",
    "thumbup": "11"
},
{
    "id": "4",
    "title": "还有一些宝宝懒得弄了，丢家里",
    "content": "[墨镜]",
    "needRichText": 0,
    "img": [{ "url": "https://image.duoyi.com/com/322/pic/dfb15f21f4a846f5b371458700fdd347.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/ed39518f40bb40dc91ffef23f19275ec.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/57cd9fdf390e4603bdcf60e010540790.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/9127399c730e49a2982dc5a2c280aac8.jpg", "width": 567, "height": 384 }],
    "gameName": "男子汉灬",
    "time": "02-24",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582608020100&di=df0f7083a2e3ec2b592e7bcb96b64da8&imgtype=jpg&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20191230%2F39309aacf6bd48c7b4a78b3d9644cef3.gif",
    "comment": "1",
    "thumbup": "3"
},
{
    "id": "5",
    "title": "有没有成都的小哥哥小姐姐[天使]",
    "content": "小白菜，啥都不会，有没[舞蹈][舞蹈][拍手][舞蹈][拍手][舞蹈]有同区的朋友加好友，加战友",
    "needRichText": 0,
    "img": [{ "url": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582609234240&di=f42500f78cd3323bfd814d8a4e692755&imgtype=0&src=http%3A%2F%2Fpic2.52pk.com%2Ffiles%2F120606%2F1284620_165254_1_lit.jpg", "width": 317, "height": 400 }],
    "gameName": "小九橙",
    "time": "02-23",
    "gameIcon": "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1636258242,3300857118&fm=26&gp=0.jpg",
    "comment": "4",
    "thumbup": "6"
},
{
    "id": "6",
    "title": "没有赶上线下北京站很遗憾",
    "content": "有没有小姐姐求[舞蹈][舞蹈][拍手][舞蹈][拍手][舞蹈]安慰",
    "needRichText": 0,
    "img": [{ "url": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582609517637&di=10d3334f7ea5d719aa3196cd46ffab87&imgtype=0&src=http%3A%2F%2Fd.hiphotos.baidu.com%2Fbaike%2Fpic%2Fitem%2F023b5bb5c9ea15ce45c20bbcb1003af33a87b253.jpg", "width": 1920, "height": 1280 }],
    "gameName": "shenmadoushi",
    "time": "02-22",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582608736103&di=3e95e4f8fd8fb4bd2f4cf2fcd1de3d45&imgtype=0&src=http%3A%2F%2Fi3.17173cdn.com%2F2fhnvk%2FYWxqaGBf%2Fcms3%2FsbzdDFbllFeEgnf.jpg",
    "comment": "16",
    "thumbup": "20"
},
{
    "id": "1",
    "title": "心不散，终夺冠！第89届神武之战...",
    "content": "在上周日进行的第89届神武之战[舞蹈][舞蹈][拍手][舞蹈][拍手][舞蹈]比赛中，战无不胜A队披荆斩棘，终获冠军！今天小吉祥为大家带了战无不胜A队的冠军采访，一起...",
    "needRichText": 1,
    "img": [{ "url": "http://5b0988e595225.cdn.sohucs.com/images/20190222/7cc43f2edb54439eb6aaee9dd804b663.jpeg", "width": 1024, "height": 768 }],
    "gameName": "神武4手游",
    "time": "16小时前",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582011742167&di=a1fbe78b2b60f0afe89cb66b7175164b&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D3460423160%2C2339690649%26fm%3D214%26gp%3D0.jpg",
    "comment": "1509",
    "thumbup": "245",
    "tag": [{ "content": "推荐", 'color': 'rgba(169,46,186,1)' }, { "content": "精华", 'color': 'green' },]
},
{
    "id": "2",
    "title": "门派小说《大道无名》今日上线 邀...",
    "content": "封印混沌，以护苍生，[舞蹈][舞蹈][拍手][舞蹈][拍手][舞蹈]《神武4》电脑版首篇门派小说《大道无名》今日正式上线，同名广播剧同步开启播放，深度揭秘轩辕黄帝三十...",
    "needRichText": 1,
    "img": [{ "url": "https://img2.ali213.net/picfile/News/2020/02/21/584_2020022154135195.jpg", "width": 584, "height": 324 }],
    "gameName": "神武4手游",
    "time": "16小时前",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582011742167&di=a1fbe78b2b60f0afe89cb66b7175164b&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D3460423160%2C2339690649%26fm%3D214%26gp%3D0.jpg",
    "comment": "9",
    "thumbup": "17",
    "tag": [{ "content": "推荐", 'color': 'rgba(169,46,186,1)' }, { "content": "活动", 'color': 'rgba(100,152,250,1)' },]
},
{
    "id": "3",
    "title": "2020",
    "content": "有好[舞蹈][舞蹈][舞蹈][舞蹈][拍手][舞蹈]友嘛",
    "needRichText": 0,
    "img": [],
    "gameName": "西哈哈哈哈哈",
    "time": "20小时前",
    "gameIcon": "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=872869510,4092430252&fm=26&gp=0.jpg",
    "comment": "9",
    "thumbup": "11"
},
{
    "id": "4",
    "title": "还有一些宝宝懒得弄了，丢家里",
    "content": "[墨[舞蹈][舞蹈][舞蹈][舞蹈][拍手][舞蹈]镜]",
    "needRichText": 0,
    "img": [{ "url": "https://image.duoyi.com/com/322/pic/dfb15f21f4a846f5b371458700fdd347.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/ed39518f40bb40dc91ffef23f19275ec.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/57cd9fdf390e4603bdcf60e010540790.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/9127399c730e49a2982dc5a2c280aac8.jpg", "width": 567, "height": 384 }],
    "gameName": "男子汉灬",
    "time": "02-24",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582608020100&di=df0f7083a2e3ec2b592e7bcb96b64da8&imgtype=jpg&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20191230%2F39309aacf6bd48c7b4a78b3d9644cef3.gif",
    "comment": "1",
    "thumbup": "3"
},
{
    "id": "5",
    "title": "有没有成都的小哥哥小姐姐[天使]",
    "content": "小白菜，啥都不会，[舞蹈][舞蹈][舞蹈][舞蹈][拍手][舞蹈]有没有同区的朋友加好友，加战友",
    "needRichText": 0,
    "img": [{ "url": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582609234240&di=f42500f78cd3323bfd814d8a4e692755&imgtype=0&src=http%3A%2F%2Fpic2.52pk.com%2Ffiles%2F120606%2F1284620_165254_1_lit.jpg", "width": 317, "height": 400 }],
    "gameName": "小九橙",
    "time": "02-23",
    "gameIcon": "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1636258242,3300857118&fm=26&gp=0.jpg",
    "comment": "4",
    "thumbup": "6"
},
{
    "id": "6",
    "title": "没有赶上线下北京站很遗憾",
    "content": "有[舞蹈][舞蹈][舞蹈][舞蹈][拍手][舞蹈]没有小姐姐求安慰",
    "needRichText": 0,
    "img": [{ "url": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582609517637&di=10d3334f7ea5d719aa3196cd46ffab87&imgtype=0&src=http%3A%2F%2Fd.hiphotos.baidu.com%2Fbaike%2Fpic%2Fitem%2F023b5bb5c9ea15ce45c20bbcb1003af33a87b253.jpg", "width": 1920, "height": 1280 }],
    "gameName": "shenmadoushi",
    "time": "02-22",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582608736103&di=3e95e4f8fd8fb4bd2f4cf2fcd1de3d45&imgtype=0&src=http%3A%2F%2Fi3.17173cdn.com%2F2fhnvk%2FYWxqaGBf%2Fcms3%2FsbzdDFbllFeEgnf.jpg",
    "comment": "16",
    "thumbup": "20"
},
{
    "id": "1",
    "title": "心不散，终夺冠！第89届神武之战...",
    "content": "在上周日进行的第89届神武之战比赛中，战无不胜A队披荆斩棘，终获冠军！今天小吉祥为[舞蹈][舞蹈][舞蹈][舞蹈][拍手][舞蹈]大家带了战无不胜A队的冠军采访，一起...",
    "needRichText": 1,
    "img": [{ "url": "http://5b0988e595225.cdn.sohucs.com/images/20190222/7cc43f2edb54439eb6aaee9dd804b663.jpeg", "width": 1024, "height": 768 }],
    "gameName": "神武4手游",
    "time": "16小时前",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582011742167&di=a1fbe78b2b60f0afe89cb66b7175164b&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D3460423160%2C2339690649%26fm%3D214%26gp%3D0.jpg",
    "comment": "1509",
    "thumbup": "245",
    "tag": [{ "content": "推荐", 'color': 'rgba(169,46,186,1)' }, { "content": "精华", 'color': 'green' },]
},
{
    "id": "2",
    "title": "门派小说《大道无名》今日上线 邀...",
    "content": "封印混沌，以护苍生，《神武4》电脑版首篇门派小说《大道无名》今日正[舞蹈][舞蹈][舞蹈][舞蹈][拍手][舞蹈]式上线，同名广播剧同步开启播放，深度揭秘轩辕黄帝三十...",
    "needRichText": 1,
    "img": [{ "url": "https://img2.ali213.net/picfile/News/2020/02/21/584_2020022154135195.jpg", "width": 584, "height": 324 }],
    "gameName": "神武4手游",
    "time": "16小时前",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582011742167&di=a1fbe78b2b60f0afe89cb66b7175164b&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D3460423160%2C2339690649%26fm%3D214%26gp%3D0.jpg",
    "comment": "9",
    "thumbup": "17",
    "tag": [{ "content": "推荐", 'color': 'rgba(169,46,186,1)' }, { "content": "活动", 'color': 'rgba(100,152,250,1)' },]
},
{
    "id": "3",
    "title": "2020",
    "content": "有好[舞蹈][舞蹈][舞蹈][舞蹈][拍手][舞蹈]友嘛",
    "needRichText": 0,
    "img": [],
    "gameName": "西哈哈哈哈哈",
    "time": "20小时前",
    "gameIcon": "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=872869510,4092430252&fm=26&gp=0.jpg",
    "comment": "9",
    "thumbup": "11"
},
{
    "id": "4",
    "title": "还有一些宝宝懒得弄了，丢家里",
    "content": "[舞蹈][舞蹈][舞蹈][舞蹈][拍手][舞蹈][墨镜]",
    "needRichText": 0,
    "img": [{ "url": "https://image.duoyi.com/com/322/pic/dfb15f21f4a846f5b371458700fdd347.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/ed39518f40bb40dc91ffef23f19275ec.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/57cd9fdf390e4603bdcf60e010540790.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/9127399c730e49a2982dc5a2c280aac8.jpg", "width": 567, "height": 384 }],
    "gameName": "男子汉灬",
    "time": "02-24",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582608020100&di=df0f7083a2e3ec2b592e7bcb96b64da8&imgtype=jpg&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20191230%2F39309aacf6bd48c7b4a78b3d9644cef3.gif",
    "comment": "1",
    "thumbup": "3"
},
{
    "id": "5",
    "title": "有没有成都的小哥哥小姐姐[天使]",
    "content": "小白菜，啥都不会，有没有同区的朋友加好友，加战[舞蹈][舞蹈][舞蹈][舞蹈][拍手][舞蹈]友",
    "needRichText": 0,
    "img": [{ "url": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582609234240&di=f42500f78cd3323bfd814d8a4e692755&imgtype=0&src=http%3A%2F%2Fpic2.52pk.com%2Ffiles%2F120606%2F1284620_165254_1_lit.jpg", "width": 317, "height": 400 }],
    "gameName": "小九橙",
    "time": "02-23",
    "gameIcon": "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1636258242,3300857118&fm=26&gp=0.jpg",
    "comment": "4",
    "thumbup": "6"
},
{
    "id": "6",
    "title": "没有赶上线下北京站很遗憾",
    "content": "有没[舞蹈][舞蹈][舞蹈][舞蹈][拍手][舞蹈]有小姐姐求安慰",
    "needRichText": 0,
    "img": [{ "url": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582609517637&di=10d3334f7ea5d719aa3196cd46ffab87&imgtype=0&src=http%3A%2F%2Fd.hiphotos.baidu.com%2Fbaike%2Fpic%2Fitem%2F023b5bb5c9ea15ce45c20bbcb1003af33a87b253.jpg", "width": 1920, "height": 1280 }],
    "gameName": "shenmadoushi",
    "time": "02-22",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582608736103&di=3e95e4f8fd8fb4bd2f4cf2fcd1de3d45&imgtype=0&src=http%3A%2F%2Fi3.17173cdn.com%2F2fhnvk%2FYWxqaGBf%2Fcms3%2FsbzdDFbllFeEgnf.jpg",
    "comment": "16",
    "thumbup": "20"
},
{
    "id": "1",
    "title": "心不散，终夺冠！第89届神武之战...",
    "content": "在上周日进行的第89届神武之战比赛中，战无不[舞蹈][舞蹈][舞蹈][舞蹈][拍手][舞蹈]胜A队披荆斩棘，终获冠军！今天小吉祥为大家带了战无不胜A队的冠军采访，一起...",
    "needRichText": 1,
    "img": [{ "url": "http://5b0988e595225.cdn.sohucs.com/images/20190222/7cc43f2edb54439eb6aaee9dd804b663.jpeg", "width": 1024, "height": 768 }],
    "gameName": "神武4手游",
    "time": "16小时前",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582011742167&di=a1fbe78b2b60f0afe89cb66b7175164b&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D3460423160%2C2339690649%26fm%3D214%26gp%3D0.jpg",
    "comment": "1509",
    "thumbup": "245",
    "tag": [{ "content": "推荐", 'color': 'rgba(169,46,186,1)' }, { "content": "精华", 'color': 'green' },]
},
{
    "id": "2",
    "title": "门派小说《大道无名》今日上线 邀...",
    "content": "封印混沌，以护苍生，《神武4》电脑[舞蹈][舞蹈][舞蹈][舞蹈][拍手][舞蹈]版首篇门派小说《大道无名》今日正式上线，同名广播剧同步开启播放，深度揭秘轩辕黄帝三十...",
    "needRichText": 1,
    "img": [{ "url": "https://img2.ali213.net/picfile/News/2020/02/21/584_2020022154135195.jpg", "width": 584, "height": 324 }],
    "gameName": "神武4手游",
    "time": "16小时前",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582011742167&di=a1fbe78b2b60f0afe89cb66b7175164b&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D3460423160%2C2339690649%26fm%3D214%26gp%3D0.jpg",
    "comment": "9",
    "thumbup": "17",
    "tag": [{ "content": "推荐", 'color': 'rgba(169,46,186,1)' }, { "content": "活动", 'color': 'rgba(100,152,250,1)' },]
},
{
    "id": "3",
    "title": "2020",
    "content": "[拍手][舞蹈][舞蹈][舞蹈]有好友嘛",
    "needRichText": 0,
    "img": [],
    "gameName": "西哈哈哈哈哈",
    "time": "20小时前",
    "gameIcon": "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=872869510,4092430252&fm=26&gp=0.jpg",
    "comment": "9",
    "thumbup": "11"
},
{
    "id": "4",
    "title": "还有一些宝宝懒得弄了，丢家里",
    "content": "[墨镜][拍手][舞蹈][舞蹈][舞蹈]",
    "needRichText": 0,
    "img": [{ "url": "https://image.duoyi.com/com/322/pic/dfb15f21f4a846f5b371458700fdd347.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/ed39518f40bb40dc91ffef23f19275ec.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/57cd9fdf390e4603bdcf60e010540790.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/9127399c730e49a2982dc5a2c280aac8.jpg", "width": 567, "height": 384 }],
    "gameName": "男子汉灬",
    "time": "02-24",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582608020100&di=df0f7083a2e3ec2b592e7bcb96b64da8&imgtype=jpg&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20191230%2F39309aacf6bd48c7b4a78b3d9644cef3.gif",
    "comment": "1",
    "thumbup": "3"
},
{
    "id": "5",
    "title": "有没有成都的小哥哥小姐姐[天使]",
    "content": "小白菜，啥都不会，有没有同区[拍手][舞蹈][舞蹈][舞蹈]的朋友加好友，加战友",
    "needRichText": 0,
    "img": [{ "url": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582609234240&di=f42500f78cd3323bfd814d8a4e692755&imgtype=0&src=http%3A%2F%2Fpic2.52pk.com%2Ffiles%2F120606%2F1284620_165254_1_lit.jpg", "width": 317, "height": 400 }],
    "gameName": "小九橙",
    "time": "02-23",
    "gameIcon": "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1636258242,3300857118&fm=26&gp=0.jpg",
    "comment": "4",
    "thumbup": "6"
},
{
    "id": "6",
    "title": "没有赶上线下北京站很遗憾",
    "content": "有没有小姐姐求安慰",
    "needRichText": 0,
    "img": [{ "url": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582609517637&di=10d3334f7ea5d719aa3196cd46ffab87&imgtype=0&src=http%3A%2F%2Fd.hiphotos.baidu.com%2Fbaike%2Fpic%2Fitem%2F023b5bb5c9ea15ce45c20bbcb1003af33a87b253.jpg", "width": 1920, "height": 1280 }],
    "gameName": "shenmadoushi",
    "time": "02-22",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582608736103&di=3e95e4f8fd8fb4bd2f4cf2fcd1de3d45&imgtype=0&src=http%3A%2F%2Fi3.17173cdn.com%2F2fhnvk%2FYWxqaGBf%2Fcms3%2FsbzdDFbllFeEgnf.jpg",
    "comment": "16",
    "thumbup": "20"
},
{
    "id": "1",
    "title": "心不散，终夺冠！第89届神武之战...",
    "content": "在上周日进行的第89届神武之战[拍手][舞蹈][舞蹈][舞蹈]比赛中，战无不胜A队披荆斩棘，终获冠军！今天小吉祥为大家带了战无不胜A队的冠军采访，一起...",
    "needRichText": 1,
    "img": [{ "url": "http://5b0988e595225.cdn.sohucs.com/images/20190222/7cc43f2edb54439eb6aaee9dd804b663.jpeg", "width": 1024, "height": 768 }],
    "gameName": "神武4手游",
    "time": "16小时前",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582011742167&di=a1fbe78b2b60f0afe89cb66b7175164b&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D3460423160%2C2339690649%26fm%3D214%26gp%3D0.jpg",
    "comment": "1509",
    "thumbup": "245",
    "tag": [{ "content": "推荐", 'color': 'rgba(169,46,186,1)' }, { "content": "精华", 'color': 'green' },]
},
{
    "id": "2",
    "title": "门派小说《大道无名》今日上线 邀...",
    "content": "封印混沌，以护苍生，《神武4》电脑[拍手][舞蹈][舞蹈][舞蹈]版首篇门派小说《大道无名》今日正式上线，同名广播剧同步开启播放，深度揭秘轩辕黄帝三十...",
    "needRichText": 1,
    "img": [{ "url": "https://img2.ali213.net/picfile/News/2020/02/21/584_2020022154135195.jpg", "width": 584, "height": 324 }],
    "gameName": "神武4手游",
    "time": "16小时前",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582011742167&di=a1fbe78b2b60f0afe89cb66b7175164b&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D3460423160%2C2339690649%26fm%3D214%26gp%3D0.jpg",
    "comment": "9",
    "thumbup": "17",
    "tag": [{ "content": "推荐", 'color': 'rgba(169,46,186,1)' }, { "content": "活动", 'color': 'rgba(100,152,250,1)' },]
},
{
    "id": "3",
    "title": "2020",
    "content": "有好友[拍手][舞蹈][舞蹈][舞蹈]嘛",
    "needRichText": 0,
    "img": [],
    "gameName": "西哈哈哈哈哈",
    "time": "20小时前",
    "gameIcon": "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=872869510,4092430252&fm=26&gp=0.jpg",
    "comment": "9",
    "thumbup": "11"
},
{
    "id": "4",
    "title": "还有一些宝宝懒得弄了，丢家里",
    "content": "[墨镜]",
    "needRichText": 0,
    "img": [{ "url": "https://image.duoyi.com/com/322/pic/dfb15f21f4a846f5b371458700fdd347.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/ed39518f40bb40dc91ffef23f19275ec.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/57cd9fdf390e4603bdcf60e010540790.jpg", "width": 567, "height": 384 },
    { "url": "https://image.duoyi.com/com/322/pic/9127399c730e49a2982dc5a2c280aac8.jpg", "width": 567, "height": 384 }],
    "gameName": "男子汉灬",
    "time": "02-24",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582608020100&di=df0f7083a2e3ec2b592e7bcb96b64da8&imgtype=jpg&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20191230%2F39309aacf6bd48c7b4a78b3d9644cef3.gif",
    "comment": "1",
    "thumbup": "3"
},
{
    "id": "5",
    "title": "有没有成都的小哥哥小姐姐[天使]",
    "content": "小白菜，啥都不会，有没有同[拍手][舞蹈][舞蹈][舞蹈]区的朋友加好友，加战友",
    "needRichText": 0,
    "img": [{ "url": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582609234240&di=f42500f78cd3323bfd814d8a4e692755&imgtype=0&src=http%3A%2F%2Fpic2.52pk.com%2Ffiles%2F120606%2F1284620_165254_1_lit.jpg", "width": 317, "height": 400 }],
    "gameName": "小九橙",
    "time": "02-23",
    "gameIcon": "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1636258242,3300857118&fm=26&gp=0.jpg",
    "comment": "4",
    "thumbup": "6"
},
{
    "id": "6",
    "title": "没有赶上线下北京站很遗憾",
    "content": "有没有小姐姐[拍手]求安慰[拍手][舞蹈][舞蹈][舞蹈]",
    "needRichText": 0,
    "img": [{ "url": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582609517637&di=10d3334f7ea5d719aa3196cd46ffab87&imgtype=0&src=http%3A%2F%2Fd.hiphotos.baidu.com%2Fbaike%2Fpic%2Fitem%2F023b5bb5c9ea15ce45c20bbcb1003af33a87b253.jpg", "width": 1920, "height": 1280 }],
    "gameName": "shenmadoushi",
    "time": "02-22",
    "gameIcon": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582608736103&di=3e95e4f8fd8fb4bd2f4cf2fcd1de3d45&imgtype=0&src=http%3A%2F%2Fi3.17173cdn.com%2F2fhnvk%2FYWxqaGBf%2Fcms3%2FsbzdDFbllFeEgnf.jpg",
    "comment": "16",
    "thumbup": "20"
}
]

let rows = {}

export default class CommunityAllView extends React.Component {
    constructor(props) {
        super(props);

        this.canRequest = false
        // 存储偏移量
        this.offsetArr = new Array()
        this.lastOffset = 0

        this.topArr = new Array()
        this.topHeightArr = new Array()
        var top = {}
        top.data = tops
        top.type = 'top'
        this.topArr.push(top)
        this.topHeightArr.push(45.5 * tops.length)
        this.offsetArr.push(0)

        this.contentArr = new Array()
        // 存储行高
        this.contentHeightArr = new Array()

        this.contentHeightDict = {}

        dataSource.forEach(dict => {
            var header = JSON.parse(JSON.stringify(dict))
            header.type = 'header'
            this.contentArr.push(header)
            this.contentHeightArr.push(50)
            this.offsetArr.push(45.5 * tops.length)

            var tag = JSON.parse(JSON.stringify(dict))
            tag.type = 'tag'
            this.contentArr.push(tag)
            this.contentHeightArr.push(this.getTagHeight(tag))
            this.offsetArr.push(45.5 * tops.length + 50)

            var title = JSON.parse(JSON.stringify(dict))
            title.type = 'title'
            this.contentArr.push(title)
            this.contentHeightArr.push(25)
            this.offsetArr.push(45.5 * tops.length + 50 + this.getTagHeight(tag))

            var content = JSON.parse(JSON.stringify(dict))
            content.type = 'content'
            this.contentArr.push(content)
            this.contentHeightArr.push(this.getContentHeight(content))
            this.offsetArr.push(45.5 * tops.length + 50 + this.getTagHeight(tag) + 25)

            var img = JSON.parse(JSON.stringify(dict))
            img.type = 'img'
            this.contentArr.push(img)
            this.contentHeightArr.push(this.getImgHeight(img))
            this.offsetArr.push(45.5 * tops.length + 50 + this.getTagHeight(tag) + 25 + this.getContentHeight(content))

            var tool = JSON.parse(JSON.stringify(dict))
            tool.type = 'tool'
            this.contentArr.push(tool)
            this.contentHeightArr.push(50)
            this.offsetArr.push(45.5 * tops.length + 50 + this.getTagHeight(tag) + 25 + this.getContentHeight(content) + this.getImgHeight(img))

        })
        this.dataArr = this.topArr.concat(this.contentArr)
        this.heightArr = this.topHeightArr.concat(this.contentHeightArr)
    }

    getContentHeight(dict) {
        this.width = Dimensions.get('window').width - 10 - 10;
        this.frameStr = '{{'+10+','+5+'},{'+this.width+','+0+'}}'
        this.contentFontSize = 15
        this.gifFontSize = 20
        getContentHeight(dict.content, this.contentFontSize, this.gifFontSize, this.width, (error, height) => {
            return height
        })
        return 100
    }

    getTagHeight(dict) {
        return dict.tag && dict.tag.length ? 30 : 0
    }

    getImgHeight(dict) {
        var maxWidth = 220, maxHeight = 200
        if (dict.img.length == 1) {
            let dic = dict.img[0]
            var width, height = 0
            if (dic.width / dic.height > maxWidth / maxHeight) {
                width = maxWidth
                height = dic.height / dic.width * width
            } else {
                height = maxHeight
                width = dic.width / dic.height * height
            }
            return height;
        } else {
            return Platform.isPad ? 210 : 110
        }
    }

    state = {
        dataList: this.dataArr,
        heightArr: this.heightArr,
        offsetArr: this.offsetArr,
        isRefresh: false,
        isLoading: true,
        page: 1,
        noData: false,
        hasMorePage: true,
        loadingMore: false,
        listHeight: 0,
        listSize: null,
        update: true,
    }

    shouldComponentUpdate() {
        return this.state.update
    }

    componentDidMount() {
        this.getShowData(1, 'refresh')
    }

    componentWillUnmount() {
        this.timer && clearTimeout(this.timer)
    }

    render() {
        if (this.state.isLoading) {
            return this.renderLoadingView()
        } else if (this.state.noData && !this.state.isLoading) {
            return this.renderEmptyView()
        } else if (!this.state.noData && !this.state.isLoading) {
            return this.renderMainView()
        }
    }

    renderLoadingView() {
        const { style } = this.props
        return (
            <View style={[styles.loading, style]}>
                <ActivityIndicator
                    animating={true}
                    color='gray'
                    size='large'
                />
            </View>
        )
    }

    renderEmptyView() {
        const { style } = this.props
        return (
            <View style={[styles.listEmpty, style]}>
                <Image style={styles.default_img}
                    source={{ uri: 'http://a3.att.hudong.com/68/61/300000839764127060614318218_950.jpg' }} />
                <Text style={styles.default_content}>未获取到数据</Text>
            </View>
        )
    }

    renderMainView() {
        const { style } = this.props
        return (
            <View style={[styles.container, style]}>
                <FlatList style={styles.flatList}
                    data={this.state.dataList}
                    keyExtractor={this.keyExtractor}
                    renderItem={this.renderItem}
                    // ItemSeparatorComponent={this.renderSeparator}
                    onScroll={this.onScroll}
                    onScrollBeginDrag={this.onScrollBeginDrag}
                    onScrollEndDrag={this.onScrollEndDrag}
                    onMomentumScrollBegin={this.onMomentumScrollBegin}
                    onMomentumScrollEnd={this.onMomentumScrollEnd}
                    refreshing={this.state.isRefresh}
                    onRefresh={this.onRefresh}
                    onEndReached={this.onEndReached}
                    onEndReachedThreshold={0.1}
                    ListFooterComponent={this.renderFooter}
                    contentContainerStyle={{ flexGrow: 1 }}
                    extraData={this.state}
                    // onViewableItemsChanged={this.onViewableItemsChanged}
                    // getItemLayout={this.getItemLayout}
                    // windowSize={300}
                />
            </View>
        );
    }

    getItemLayout = (data, index) => {
        return {length:this.getLength(data, index), offset:this.getOffset(data, index), index:index}
    }

    getLength = (data, index) => {
        // // console.log('this.state.heightArr = ' + this.state.heightArr[index])
        return this.state.heightArr[index]
    }

    getOffset = (data, index) => {
        return this.state.offsetArr[index]
    }

    // onViewableItemsChanged = (info) => {
    //     // console.log('info = ' + JSON.stringify(info))
    //     info.changed.forEach((currentValue, index, arr) => {
    //         // console.log('currentValue = ' + JSON.stringify(currentValue))
    //         rows[currentValue.key].setVisible(currentValue.isViewable)
    //     })
    // }

    onEndReached = () => {
        // console.log('onEndReached')
        this.requestMoreData()
    }

    requestMoreData = () => {
        // console.log('requestMoreData')
        if (!this.canRequest) return
        if (this.state.page * dataSource.length < this.state.listSize && !this.state.loadingMore) {
            this.setState({
                loadingMore: true,
            }, () => {
                this.getShowData(this.state.page)
            })
        } else if (this.state.page * dataSource.length >= this.state.listSize && !this.state.loadingMore) {
            // console.log('has no more page')
            this.setState({
                hasMorePage: false,
                update: false
            })
        }
    }

    renderFooter = () => {
        // console.log('hasMorePage = ' + this.state.hasMorePage + ', page = ' + this.state.page)
        if (this.state.hasMorePage && this.state.page >= 1) {
            return (
                <View style={styles.footer}>
                    <ActivityIndicator />
                    <Text style={{ marginLeft: 10 }}>正在加载更多数据...</Text>
                </View>
            )
        } else if (!this.state.hasMorePage && this.state.page >= 1) {
            return (
                <View style={{ height: 30, alignItems: 'center', justifyContent: 'flex-start', }}>
                    <Text style={{ color: '#999999', fontSize: 14, marginTop: 5, marginBottom: 5, }}>
                        没有更多数据了
                    </Text>
                </View>
            )
        } else {
            return (
                <View style={styles.footer}>
                    <Text></Text>
                </View>
            )
        }
    }

    onRefresh = () => {
        this.setState({
            isRefresh: true,
            page: 1
        }, () => {
            this.getShowData(1, 'refresh')
        })
    }

    getShowData = (page, type) => {
        // console.log('getShowData')
        this.timer = setTimeout(() => {
            if (type === 'refresh') {
                this.setState({
                    dataList: this.dataArr,
                    heightArr: this.heightArr,
                    offsetArr: this.offsetArr,
                    page: 1,
                    isRefresh: false,
                    isLoading: false,
                    noData: false,
                    loadingMore: false,
                    hasMorePage: true,
                    listSize: 300,
                })
            } else {
                var arr = [].concat(this.state.dataList)
                var heightArr = [].concat(this.state.heightArr)
                var offsetArr = [].concat(this.state.offsetArr)
                this.lastOffset = offsetArr[offsetArr.length - 1] + 50
                var newOffsetArr = new Array()
                newOffsetArr.push(this.lastOffset)
                for (var i = 0; i < this.contentHeightArr.length; i++) {
                    let height = this.contentHeightArr[i]
                    if (i < this.contentHeightArr.length - 1) {
                        newOffsetArr.push(height)
                    }
                }
                this.setState({
                    dataList: arr.concat(this.contentArr),
                    heightArr: heightArr.concat(this.contentHeightArr),
                    offsetArr: offsetArr.concat(newOffsetArr),
                    page: this.state.page + 1,
                    isRefresh: false,
                    isLoading: false,
                    noData: false,
                    loadingMore: false,
                    listSize: 300,
                })
            }
        }, 50)
    }

    // 此函数用于为给定的item生成一个不重复的key
    keyExtractor = (item, index) => '' + index;

    renderItem = ({ item, index }) => {
        if (item == null) return
        if (item.type == 'top') {
            return (
                <CommunityTopCell data={item.data} clickTopAction={this.clickTopAction} />
            )
        } else if (item.type == 'header') {
            return (
                <CommunityHeaderCell data={item} moreAction={this.moreAction} clickCellAction={this.clickCellAction} />
            )
        } else if (item.type == 'title') {
            return (
                <CommunityTitleCell data={item} clickCellAction={this.clickCellAction} />
            )
        } else if (item.type == 'content') {
            return (
                <CommunityContentCell data={item} height={this.contentHeight(item)} clickCellAction={this.clickCellAction} cacheHeight={this.cacheContentHeight}/>
            )
        } else if (item.type == 'img' && item.img.length == 1) {
            return (
                <CommunityMediaCell ref={el => {
                    let key = String(index)
                    rows[key] = el
                }} data={item} clickImgAction={this.clickImgAction} />
            )
        } else if (item.type == 'img' && item.img.length > 1) {
            return (
                <CommunityMediaGatherCell ref={el => {
                    let key = String(index)
                    rows[key] = el
                }} data={item} clickImgAction={this.clickImgAction} />
            )
        } else if (item.type == 'tool') {
            return (
                <CommunityToolCell data={item} thumbupAction={this.thumbupAction} shareAction={this.shareAction} commentAction={this.commentAction} />
            )
        } else if (item.type == 'tag' && item.tag && item.tag.length > 0) {
            return (
                <CommunityTagCell data={item} clickCellAction={this.clickCellAction} />
            )
        }
    }

    contentHeight = (item) => {
        let width = Dimensions.get('window').width - 20
        let key = width + item.content
        let height = this.contentHeightDict[key]
        return height
    }

    cacheContentHeight = (key, height) => {
        this.contentHeightDict[key] = height;
    }

    clickTopAction = (item) => {
        // console.log('all_clickTopAction')
        all_clickTopAction(item)
    }

    clickImgAction = (item, imgs, radius, idx) => {
        // console.log('all_clickImgAction')
        all_clickImgAction(item, imgs, radius, idx)
    }

    moreAction = (item) => {
        // console.log('all_moreAction')
        all_moreAction(item)
    }

    clickCellAction = (item) => {
        // console.log('all_clickCellAction')
        all_clickCellAction(item)
    }

    shareAction = (item) => {
        // console.log('all_shareAction')
        all_shareAction(item)
    }

    commentAction = (item) => {
        // console.log('all_commentAction')
        all_commentAction(item)
    }

    thumbupAction = (item) => {

    }

    onScroll = (event) => {
        let offSetY = event.nativeEvent.contentOffset.y
        let contentSizeHeight = event.nativeEvent.contentSize.height
        if (contentSizeHeight - offSetY < 2000) {
            this.requestMoreData()
        }
    }

    onScrollBeginDrag = () => {
        // console.log('onScrollBeginDrag');
        this.canRequest = true;
    }
    onScrollEndDrag = () => {
        // console.log('onScrollEndDrag');
        this.canRequest = false;
    }
    onMomentumScrollBegin = () => {
        // console.log('onMomentumScrollBegin');
        this.canRequest = true;
    }
    onMomentumScrollEnd = () => {
        // console.log('onMomentumScrollEnd');
        this.canRequest = false;
    }
}

const styles = StyleSheet.create({
    safeAreaView: {
        flex: 1
    },
    container: {
        flex: 1,
    },
    sortView: {
        height: 50,
        marginLeft: 0,
        marginRight: 0,
    },
    flatList: {

    },
    separator: {
        height: 0.5,
        marginRight: 0,
        backgroundColor: '#ced0ce',
        marginLeft: 10,
    },
    footer: {
        flexDirection: 'row',
        height: 24,
        justifyContent: 'center',
        alignItems: 'center',
        marginBottom: 10,
    },
    loading: {
        justifyContent: 'center',
        alignItems: 'center',
        flex: 1,
    },
    listEmpty: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
    },
    default_img: {
        width: 90,
        height: 90,
        marginBottom: 20,
        backgroundColor: '#eeeeee'
    },
    default_content: {
        fontFamily: 'PingFangSC-Regular',
        fontSize: 15,
        height: 21,
        color: '#CCCCCC',
        textAlign: 'center'
    }
})